#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# @Time: 2019/4/18  12:28
# @Author: 余浪人
# @email: yulangren520@gmail.com

''' 管理员用户登录'''

from flask_login import LoginManager
from apps.models.admin_model import Admin_Model

login_manager = LoginManager()


@login_manager.user_loader
def load_user(user_id):
    return Admin_Model.query.filter_by(id=int(user_id)).first()